This invention relates to computer systems that process streaming input/output (I/O) and more particularly, to computer systems and methods for managing streaming I/O resources of the computer systems.
Computers are evolving well beyond their traditional desktop roots. In addition to conventional desktop applications (e.g., word processing, spreadsheets, email, etc.), today""s personal computers (PCs) are asked to play audio and video files, play music CDs (compact discs), receive and display broadcast programming, and so forth. Much of this evolution is being driven by the continued convergence of computing, Internet, telephony, and entertainment technologies.
As a result, the look, feel, and functionality of computers are continuing to evolve for different consumer and operating environments. For instance, computers designed for home entertainment might be implemented as a set-top box or a game console, equipped with browser software, one or more tuners, EPG (electronic programming guide) software, different audio/video drivers, and gaming software. Computers designed for office use may resemble conventional desktop PCs in appearance, but be implemented with broadcast tuners, DVD (digital video disks) drives, stereo speakers with surround sound, and so forth, to offer a more enhanced computing experience. The variety and functionality of portable computers are even wider ranging as the demands of the mobile user increase.
As computers are asked to perform more diverse tasks, it is not uncommon for users to expect performance of multiple tasks simultaneously. Due to this increasing user demand, there is more demand being placed on the existing system resources to handle the various tasks. This unfortunately leads to a greater likelihood that the computer may not have sufficient resources at a requested time to accomplish all of the tasks simultaneously.
This resource shortfall is perhaps most evident for computers designed for the home entertainment environment. Such an environment makes significant use of streaming input/output (I/O) technology. Streaming technology is used, for instance, to provide full-motion video over the Internet or from another source, such as a DVD player. As the name indicates, streaming technology provides a stream of data from an input source such as a disk, video camera, computer file, etc., and renders that data to an output device, typically a video monitor or a television. In most implementations, the input of the data stream is closely synchronized with the output of the data stream, so that when a portion of the data stream is being input, another portion of the data stream is being output.
Streaming I/O technology is limited by the bandwidth of the disk to which the data is written and from which the data is read, as well as the bandwidth of the processor used to execute the streaming I/O process. As used herein with regard to a disk, the term xe2x80x9cbandwidthxe2x80x9d refers to the volume of data that can be written to the disk in a given amount of time. For example, a disk may have a bandwidth of 0.5 megabits per 100 milliseconds, which means that during a 100-millisecond period, the disk can receive or transmit 0.5 megabits of data. As used herein with regard to a processor, the term xe2x80x9cbandwidthxe2x80x9d refers to the number of instructions that the processor can execute in a given amount of time. For example, a processor may have a bandwidth of five million (5 M) instructions per second.
Components such as disks and processors that provide streaming I/O bandwidth are commonly referred to as streaming I/O bandwidth providers, or as used herein, providers. Components or applications that require bandwidth from a processor and/or a disk to operate streaming I/O functions are referred to as streaming I/O bandwidth consumers, or as used herein, consumers.
Streaming of audiovisual data imposes significant bandwidth requirements on a processor and I/O subsystem of a computer system. A single streaming I/O application can easily consume most of the bandwidth of the processor and I/O subsystem on currently available platforms. If the disk bandwidth or the processor bandwidth is exceeded, the user will experience undesirable artifacts such as video frame dropping, audio glitches, etc. It is, therefore, very important to manage disk and processor bandwidth to the greatest extent possible when processing streaming applications.
In addition, computers are sometimes required to provide multiple streaming I/O functions simultaneously. For instance, a user may request that a television integrated into an entertainment computer display video from one streaming I/O application while, at the same time, the user may want to utilize a picture-in-picture (PIP) function to display video from a different streaming I/O source. This can pose a problem if the two bandwidth consumers, taken together, require more bandwidth than the bandwidth provider has available.
In such situations, the computer is at a loss to distinguish which task should be performed and which should not. Today, applications obtain system resources on a first-come or last-come basis and usually hold the resources for as long as they require. Accordingly, the applications control resource allocation irrespective of users"" desires. In the above example, if the system operates on a first-come basis, then the television application will seize control of provider bandwidth to a degree that does not allow the PIP to function. If the execution of applications is enforced, the PIP will take provider bandwidth even though there is not enough to support both the television and the PIP. In that case, both the television and the PIP will not operate properly. If the system is designed to operate on an enforced last-come basis, the PIP will run and may consume too much bandwidth to allow the television to operate properly and the television application could exhibit undesirable artifacts or it could be terminated altogether.
Thus, as the demand for streaming I/O resources continues to grow, there is greater need for techniques to manage streaming I/O provider bandwidth to provide sufficient bandwidth to streaming I/O consumers for the consumers to operate simultaneously without exhibiting undesirable artifacts.
Described herein are architectures and methods that provide unenforced streaming I/O bandwidth resource management in computer systems having streaming I/O bandwidth providers and streaming I/O bandwidth consumers.
A streaming I/O consumer resource manager is described for managing streaming I/O bandwidth of a disk bandwidth provider and a processor bandwidth provider. The streaming I/O resource management provides unenforced allocation of disk and processor bandwidth to streaming I/O bandwidth consumers. Unenforced allocation means that a bandwidth consumer may or may not get thee bandwidth it requests. It also means that once bandwidth has been allocated to a bandwidth consumer, the bandwidth is not guaranteed and may be re-allocated to another bandwidth consumer. Such unenforced allocation provides a relatively simple and inexpensive way to operate a multi-application computing device.
In the described implementation, streaming I/O bandwidth providers (as discussed herein, a disk and a processor) first determine the approximate bandwidth provider streaming capacity, which is the total amount of bandwidth available for allocation to streaming I/O bandwidth consumers. This can be accomplished in different ways. For example, when the computer system is initialized, approximations can be made by accessing a lookup table containing such information for several types of disks and processors. Alternately, approximations can be made by executing benchmark tests using the bandwidth providers to gain empirical data as to the capacity.
Streaming I/O consumers, such as applications, acquire provider (disk or processor) bandwidth by calling a resource management system with the approximate quantity of bandwidth they require. The resource management system may reside within an operating system of the computer system or it may be included within the provider itself, such as in disk controller software.
The resource management system determines if the requested bandwidth is available. This can be accomplished in the described embodiment by obtaining bandwidth in two ways. First, bandwidth that is unused can be allocated to satisfy the request in whole or in part. If the request cannot be satisfied from unused bandwidth, the resource manager may also take bandwidth that is currently allocated to a different consumer. To re-allocated bandwidth that has already been allocated, the consumer requesting bandwidth must have a higher priority than the consumer that holds the bandwidth that is to be re-allocated.
If the resource manager can accumulate sufficient bandwidth from a provider to satisfy the consumer""s request, the consumer is allocated provider bandwidth according to the request. If sufficient provider bandwidth cannot be found, the requested bandwidth is denied. If the requested bandwidth is denied, and if the consumer (application) is designed so that it is adaptive, the consumer can submit a second request to the resource manager to request less bandwidth than the initial request, but sufficient bandwidth for the consumer to operate at an acceptable, if not optimal, performance level.